package com.example.server.config;

import com.example.server.service.HessianService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.remoting.caucho.HessianServiceExporter;

import javax.annotation.Resource;

/**
 * @Author: YAOZUN
 * @Date: Created in 19:39 2018/12/15 0015
 * @Description:
 */
@Configuration
public class HessionServiceConfig {

    @Resource
    private HessianService hessianService;

    @Bean("/hessianTest")
    public HessianServiceExporter exportHelloHessian()
    {
        HessianServiceExporter exporter = new HessianServiceExporter();
        exporter.setService(hessianService);
        exporter.setServiceInterface(HessianService.class);
        return exporter;
    }

}
